package flex.cc.uac.enums;

import java.util.Arrays;
import java.util.List;


public enum UacUserSourceEnum {


	REGISTER("REGISTER", "注册"),

	INSERT("INSERT", "后台新增"),

	IMPORT("IMPORT", "后台导入"),

	APP("APP", "手机"),;


	String key;

	String value;

	UacUserSourceEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}


	public String getKey() {
		return key;
	}


	public String getValue() {
		return value;
	}


	public static String getValue(String key) {
		for (UacUserSourceEnum ele : UacUserSourceEnum.values()) {
			if (key.equals(ele.getKey())) {
				return ele.getValue();
			}
		}
		return null;
	}

	public static UacUserSourceEnum getEnum(String key) {
		for (UacUserSourceEnum ele : UacUserSourceEnum.values()) {
			if (key.equals(ele.getKey())) {
				return ele;
			}
		}
		return null;
	}


	public static List<UacUserSourceEnum> getList() {
		return Arrays.asList(UacUserSourceEnum.values());
	}
}
